<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
    <button v-on:click="sayHi">click Me</button>
</div>



<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            message: '学习 Vue 的第二天！'
        },
        methods: { // 方法必须定义在 Vue 的 Method 对象中
            sayHi: function () {
                alert(this.message);
            }
        }
    });

</script>
</body>
</html>